]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
pointerA11yTimeout: Fade the pie timer in
authorJonas Dreßler <verdre@v0yd.nl>
Thu, 22 Aug 2019 08:02:42 +0000 (10:02 +0200)
committerOlivier Fourdan <ofourdan@redhat.com>
Tue, 27 Aug 2019 08:03:49 +0000 (08:03 +0000)
Fade the pie timer in using a duration of 1/4 of the timeout and a
EASE_IN_QUAD animation. This significantly reduces flickering of the pie
timer while moving the cursor and makes the timer less distracting.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/688

js/ui/pointerA11yTimeout.js

index ce7596d57b3b6acf2a7c6d5e43b15e2c413389f4..0546f1de4b467665ea241bc2502ee3d096e8951e 100644 (file)
@@ -69,6 +69,7 @@ var PieTimer = GObject.registerClass({
     start(x, y, duration) {
         this.remove_all_transitions();
 
+        this.opacity = 0;
         this.x = x - this.width / 2;
         this.y = y - this.height / 2;
         this._angle = 0;
@@ -76,6 +77,12 @@ var PieTimer = GObject.registerClass({
         this.show();
         Main.uiGroup.set_child_above_sibling(this, null);
 
+        this.ease({
+            opacity: 255,
+            duration: duration / 4,
+            mode: Clutter.AnimationMode.EASE_IN_QUAD
+        });
+
         this.ease_property('angle', 2 * Math.PI, {
             duration,
             mode: Clutter.AnimationMode.LINEAR,